<link href="<?php echo Yii::app()->theme->baseUrl; ?>/css/form.css" rel="stylesheet" type="text/css" />
<div class="form-group">
	<div class="col-md-12">
		<div class="box box-primary">
            <div class="box-header">
                <h3 class="box-title"><?php echo $title; ?></h3>
            </div><!-- /.box-header -->
			<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'taikhoan-form',
				'enableAjaxValidation'=>false,
			)); ?>
				<div class="box-body">			
					<div class="left left-1">
						<div class="form-group">
							<?php echo $form->labelEx($model,'ten'); ?>
							<?php echo $form->textField($model,'ten',array('class'=>'form-control','placeholder'=>'Tên đối tác','size'=>60,'maxlength'=>150)); ?>
							<?php echo $form->error($model,'ten'); ?>
						</div>

						<div class="form-group">
							<?php echo $form->labelEx($model,'ma_so'); ?>
							<?php echo $form->textField($model,'ma_so',array('class'=>'form-control','placeholder'=>'Mã số đối tác','size'=>50,'maxlength'=>50)); ?>
							<?php echo $form->error($model,'ma_so'); ?>
						</div>
						<?php $this->widget('DoiTac.components.LoaiHinhKinhdoanhWidget',array('model'=>$model,'form'=>$form));  ?>
						<div class="form-group">
							<?php echo $form->labelEx($model,'dia_chi'); ?>
							<?php echo $form->textArea($model,'dia_chi',array('class'=>'form-control','placeholder'=>'Địa chỉ','rows'=>6, 'cols'=>50)); ?>
							<?php echo $form->error($model,'dia_chi'); ?>
						</div>

						<div class="form-group">
							<?php echo $form->labelEx($model,'dien_thoai'); ?>
							<?php echo $form->textField($model,'dien_thoai',array('class'=>'form-control','placeholder'=>'Số điện thoại','size'=>50,'maxlength'=>50)); ?>
							<?php echo $form->error($model,'dien_thoai'); ?>
						</div>
					</div>

					<div class="left left-2">
						<div class="form-group">
							<?php echo $form->labelEx($model,'mo_ta'); ?>
							<?php echo $form->textArea($model,'mo_ta',array('rows'=>6, 'cols'=>50,'class'=>'form-control','placeholder'=>'Mô tả')); ?>
							<?php echo $form->error($model,'mo_ta'); ?>
						</div>

						<div class="form-group">
							<?php echo $form->labelEx($model,'website'); ?>
							<?php echo $form->textField($model,'website',array('size'=>60,'maxlength'=>100,'class'=>'form-control','placeholder'=>'Trang web đối tác')); ?>
							<?php echo $form->error($model,'website'); ?>
						</div>

						<div class="form-group">
							<?php echo $form->labelEx($model,'cam_ket'); ?>
							<?php echo $form->textField($model,'cam_ket',array('class'=>'form-control','placeholder'=>'Cam kết chiết khấu')); ?>
							<?php echo $form->error($model,'cam_ket'); ?>
						</div>
						<div class="form-group">
							<?php echo $form->labelEx($model,'chi_phi_dv'); ?>
							<?php echo $form->textField($model,'chi_phi_dv',array('class'=>'form-control','placeholder'=>'Cam kết chiết khấu')); ?>
							<?php echo $form->error($model,'chi_phi_dv'); ?>
						</div>

						<div class="form-group">
							<?php echo $form->labelEx($model,'so_hop_dong'); ?>
							<?php echo $form->textField($model,'so_hop_dong',array('class'=>'form-control','placeholder'=>'Số hợp đồng','size'=>50,'maxlength'=>50)); ?>
							<?php echo $form->error($model,'so_hop_dong'); ?>
						</div>
						<div class="form-group buttons">
							<?php echo CHtml::submitButton($model->isNewRecord ? 'Tạo mới' : 'Chỉnh sửa'); ?>
						</div>
					</div>
					<div style="clear:both;"></div>
				</div>
			<?php $this->endWidget(); ?>
		</div>
	</div>
</div><!-- form -->
<script type="text/javascript">
$(document).on('keyup keypress', '#loai_hinh_kinhdoanh-tokenfield', function(e) {
  if(e.which == 13) {
    e.preventDefault();
    return false;
  }
});
</script>
<style type="text/css">
.left{
	width: 30%;
	margin-left: 30px;
	float: left;
}
.ui-autocomplete{
        width: 23% !important;
        min-width: 12% !important;
    }
</style>